package Lesson.Student;

import java.util.Scanner;

public class Demo4 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();

        System.out.println("请输入对称字符串：");
        String str = sc.nextLine();
        sb.append(str);
        sb.reverse();

        if(str.equals(sb.toString())){
            System.out.println("输入的是对称字符串。");
        }else{
            System.out.println("输入的不是对称字符串。");
        }
    }
}
